-
Notifications
You must be signed in to change notification settings - Fork 63
Add Pandas to_dict
adapter transform
#416
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
bayesflow/adapters/transforms/to_dict.py:26
- [nitpick] Use the existing 'value' variable for type checking instead of re-referencing data[key] to improve clarity. For example, change it to 'if isinstance(value, pd.Series):'.
if isinstance(data[key], pd.Series):
Codecov ReportAttention: Patch coverage is
|
@paul-buerkner if test pass, could you please add your review and then merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Waiting for checks to pass and then we can merge.
Usage:
Automatically converts any
object
andcategory
columns to one-hot encodings.This is nice for datasets that are based on
pandas.DataFrame
without requiring too much manual conversion in those datasets. This transform should always be used first, as it assumes the sole input is apandas.DataFrame
.Docs are still missing, if anyone wants to contribute this feel free to!